﻿// 1.1.2.04. Declare an integer variable and assign it with the value 254 in hexadecimal format.
// Use Windows Calculator to find its hexadecimal representation.

using System;

class HexadecimalVariable
{
    static void Main()
    {
        int asDec = 256;    // Declaring 256 with int variable as decimal value
        int asHex = 0x100;  // Declaring 256 with int variable as hexadecimal value
        Console.WriteLine("{0}", asDec);   // Printing "inDec" variable
        Console.WriteLine("{0}", asHex);   // Printing "inHex" variable
        Console.WriteLine("{0:X}", asDec);  // Printing "inDec" variable as hexadecimal value
        Console.WriteLine("{0:X}", asHex);  // Printing "inHex" variable as hexadecimal value
        Console.WriteLine(asDec == asHex);  // Comparing both variables so if the result is "true" that means they are equal    
    }
}